﻿using LINQ = JLL.China.Infrastructure.Repositories.LINQ2SQL;
namespace JLL.China.Infrastructure.Repositories.ProjectDirFloorPlan
{
    public static class PrjDirFlrPlanRefactory
    {
        public static Model.ProjectDirFloorPlan FromLINQObject(LINQ.ProjectDirFloorPlan prj)
        {
            if (prj == null)
            {
                return null;
            }
            else
            {
                var model = new Model.ProjectDirFloorPlan()
                {
                    ProjectDirFloorPlan_ID = prj.ProjectDirFloorPlan_ID,
                    TypeModel = prj.TypeModel,
                
                    NoUnit = prj.NoUnit,
                    FloorPlanImg = prj.FloorPlanImg,
                    ListingFID = prj.ListingFID,
                    LanguageFID = prj.LanguageFID
                };
                return model;
            }
        }

        public static LINQ.ProjectDirFloorPlan ToLINQObject(Model.ProjectDirFloorPlan prj)
        {
            var model = new LINQ.ProjectDirFloorPlan()
            {
                ProjectDirFloorPlan_ID = prj.ProjectDirFloorPlan_ID,
                TypeModel = prj.TypeModel,
                NoUnit = prj.NoUnit,
                FloorPlanImg = prj.FloorPlanImg,
                ListingFID = prj.ListingFID,
                LanguageFID = prj.LanguageFID
            };
            return model;
        }
    }
}
